<?php

@include_once("connect.php");

$res = [];
$tell = $_POST['tellnumber'];
// $num=$_GET['num'];
$id = $_POST['id'];

if ($tell && $id) {
  $sql = "DELETE FROM user_cart WHERE tellnumber= '$tell' AND goods_id='$id'";
  $a = mysqli_query($con, $sql);
  if ($a > 0) {
    $res["status"] = true;
    $res["mag"] = "删除成功";
  } else {
    $res["status"] = false;
    $res["mag"] = "数据库错误";
  }
}else{
  $res["status"] = false;
    $res["mag"] = "前端数据错误";
}
echo (json_encode($res, JSON_UNESCAPED_UNICODE));
